﻿using Dapper.Contrib.Extensions;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Gx.Model.Entity
{
    [System.ComponentModel.DataAnnotations.Schema.Table("LK_WarehouseEntryDetail")]
    public class LKWarehouseEntryDetail
    {
        [System.ComponentModel.DataAnnotations.Key]
        private int _id;
        /// <summary>
        /// Id
        /// </summary>
        [Column("Id")]
        public int Id
        {
            get
            {
                return _id;
            }
            set { _id = value; }
        }


        private int _entryId;
        /// <summary>
        /// 入库单id
        /// </summary>
        [Column("EntryId")]
        public int EntryId
        {
            get
            {
                return _entryId;
            }
            set { _entryId = value; }
        }


        private string _goodsNo;
        /// <summary>
        /// 商品批号
        /// </summary>
        [Column("GoodsNo")]
        public string GoodsNo
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_goodsNo))
                    _goodsNo = string.Empty;
                return _goodsNo;
            }
            set { _goodsNo = value; }
        }


        private int _goodsId;
        /// <summary>
        /// 商品id;
        /// </summary>
        [Column("GoodsId")]
        public int GoodsId
        {
            get
            {
                return _goodsId;
            }
            set { _goodsId = value; }
        }


        private int _goodsSpecId;
        /// <summary>
        /// 规格;
        /// </summary>
        [Column("GoodsSpecId")]
        public int GoodsSpecId
        {
            get
            {
                return _goodsSpecId;
            }
            set { _goodsSpecId = value; }
        }


        private int _wareHouseId;
        /// <summary>
        /// 仓位;
        /// </summary>
        [Column("WareHouseId")]
        public int WareHouseId
        {
            get
            {
                return _wareHouseId;
            }
            set { _wareHouseId = value; }
        }


        private string _goodsName;
        /// <summary>
        /// 商品名称
        /// </summary>
        [Column("GoodsName")]
        public string GoodsName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_goodsName))
                    _goodsName = string.Empty;
                return _goodsName;
            }
            set { _goodsName = value; }
        }


        private string _goodsSpecName;
        /// <summary>
        /// 规格名称
        /// </summary>
        [Column("GoodsSpecName")]
        public string GoodsSpecName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_goodsSpecName))
                    _goodsSpecName = string.Empty;
                return _goodsSpecName;
            }
            set { _goodsSpecName = value; }
        }


        private string _wareHouseName;
        /// <summary>
        /// 仓库名称
        /// </summary>
        [Column("WareHouseName")]
        public string WareHouseName
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_wareHouseName))
                    _wareHouseName = string.Empty;
                return _wareHouseName;
            }
            set { _wareHouseName = value; }
        }


        private decimal _weight;
        /// <summary>
        /// 件重
        /// </summary>
        [Column("Weight")]
        public decimal Weight
        {
            get
            {
                return _weight;
            }
            set { _weight = value; }
        }


        private int _number;
        /// <summary>
        /// 件数
        /// </summary>
        [Column("Number")]
        public int Number
        {
            get
            {
                return _number;
            }
            set { _number = value; }
        }


        private decimal _area;
        /// <summary>
        /// 面积
        /// </summary>
        [Column("Area")]
        public decimal Area
        {
            get
            {
                return _area;
            }
            set { _area = value; }
        }


        private decimal _avNumber;
        /// <summary>
        /// 每板件数
        /// </summary>
        [Column("AvNumber")]
        public decimal AvNumber
        {
            get
            {
                return _avNumber;
            }
            set { _avNumber = value; }
        }


        private decimal _tonWeight;
        /// <summary>
        /// 吨重
        /// </summary>
        [Column("TonWeight")]
        public decimal TonWeight
        {
            get
            {
                return _tonWeight;
            }
            set { _tonWeight = value; }
        }


        private int _plateNumber;
        /// <summary>
        /// 板数
        /// </summary>
        [Column("PlateNumber")]
        public int PlateNumber
        {
            get
            {
                return _plateNumber;
            }
            set { _plateNumber = value; }
        }


        private System.DateTime _productionDate;
        /// <summary>
        /// 生产日期
        /// </summary>
        [Column("ProductionDate")]
        public System.DateTime ProductionDate
        {
            get
            {
                if (_productionDate == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _productionDate;
            }
            set { _productionDate = value; }
        }


        private System.DateTime _expirationDate;
        /// <summary>
        /// 保质日期
        /// </summary>
        [Column("ExpirationDate")]
        public System.DateTime ExpirationDate
        {
            get
            {
                if (_expirationDate == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _expirationDate;
            }
            set { _expirationDate = value; }
        }


        private string _producingArea;
        /// <summary>
        /// 产地
        /// </summary>
        [Column("ProducingArea")]
        public string ProducingArea
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_producingArea))
                    _producingArea = string.Empty;
                return _producingArea;
            }
            set { _producingArea = value; }
        }


        private string _remark;
        /// <summary>
        /// 备注
        /// </summary>
        [Column("Remark")]
        public string Remark
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_remark))
                    _remark = string.Empty;
                return _remark;
            }
            set { _remark = value; }
        }


        private string _remark1;
        /// <summary>
        /// 备注1
        /// </summary>
        [Column("Remark1")]
        public string Remark1
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_remark1))
                    _remark1 = string.Empty;
                return _remark1;
            }
            set { _remark1 = value; }
        }


        private string _remark2;
        /// <summary>
        /// 备注2
        /// </summary>
        [Column("Remark2")]
        public string Remark2
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_remark2))
                    _remark2 = string.Empty;
                return _remark2;
            }
            set { _remark2 = value; }
        }


        private string _remark3;
        /// <summary>
        /// 备注3
        /// </summary>
        [Column("Remark3")]
        public string Remark3
        {
            get
            {
                if (string.IsNullOrWhiteSpace(_remark3))
                    _remark3 = string.Empty;
                return _remark3;
            }
            set { _remark3 = value; }
        }


        private bool _processed;
        /// <summary>
        /// 已处理
        /// </summary>
        [Column("Processed")]
        public bool Processed
        {
            get
            {
                return _processed;
            }
            set { _processed = value; }
        }


        private System.DateTime _createTime;
        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("CreateTime")]
        public System.DateTime CreateTime
        {
            get
            {
                if (_createTime == DateTime.MinValue)
                {
                    return DateTime.Parse("1911-01-01");
                }
                return _createTime;
            }
            set { _createTime = value; }
        }


        private bool _isDeleted;
        /// <summary>
        /// 是否删除
        /// </summary>
        [Column("IsDeleted")]
        public bool IsDeleted
        {
            get
            {
                return _isDeleted;
            }
            set { _isDeleted = value; }
        }

        /// <summary>
        /// 入库件数
        /// </summary>
        [Computed]
        public int OrginNumber { get; set; }
    }
}

